<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">

    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <h:outputStylesheet library="css" name="estilo.css" />
        <title>Fitness Home</title>
    </h:head>

    <h:body>
        <h:form >
            <div align="left">

                <p:commandLink id="alunos" oncomplete="formularioUser.show();">
                    <h:graphicImage library="images" name="User.png"/>
                </p:commandLink>
                <p:tooltip for="alunos" value="Alunos" showEffect="fade" hideEffect="fade" /> 
                <br>


                </br>
                <!--<p:commandLink id="atividades" oncomplete="fomularioAtividades.show();">
                    <h:graphicImage library="images" name="Atividade.png"/>
                </p:commandLink>
                <p:tooltip for="atividades" value="Atividades" showEffect="fade" hideEffect="fade" />  
                <br>


                </br>
                <p:commandLink id="avaliacao" oncomplete="fomularioAvaliacoes.show();">
                    <h:graphicImage library="images" name="Avaliacao.png"/>
                </p:commandLink>
                <p:tooltip for="avaliacao" value="Avaliações e Treinos" showEffect="fade" hideEffect="fade" /> -->  

            </div>
        </h:form>

        <p:dialog id="modalDialog" header="Usuários" widgetVar="formularioUser" modal="true" height="400" width="600">  
            <h:form id="lista">  
                <div id="formPesquisar">

                    <h:panelGrid>
                        <h:outputLabel>
                            <p:inputText id="pesquisar" value="#{alunoBean.pesquisar}" size="30" />
                            <p:watermark for="pesquisar" value="Pesquisar" />
                            <p:spacer width="4"/>
                            <p:commandLink  actionListener="#{alunoBean.exibirAlunos(actionEvent)}" update=":lista" process="@form">
                                <h:graphicImage library="images" name="search.png"/>
                            </p:commandLink> 
                        </h:outputLabel>
                    </h:panelGrid>

                </div>
                <br></br>

                <h:messages id="messages" showDetail="true" />  
                <p:dataTable id="alunosLis" value="#{alunoBean.alunos}" var="listaAlunos" selectionMode="single" widgetVar="tabelaAlunos" editingRow="true" rows="5" paginator="true" >  
                    <f:facet name="header">  
                        Alunos
                    </f:facet>  

                    <p:column >
                        <f:facet name="header">Nome</f:facet>
                        <h:outputText value="#{listaAlunos.nome}"/>
                    </p:column>  
                    <p:column >
                        <f:facet name="header">Objetivo</f:facet>
                        <h:outputText value="#{listaAlunos.biotipo}"/>
                    </p:column>  
                    <p:column >
                        <f:facet name="header">Opções</f:facet>
                        <p:commandLink id="editButton" update=":cadastro" process="@form" oncomplete="cadastroAluno.show()">
                            <h:graphicImage library="images" name="edit.png"/>
                            <f:setPropertyActionListener target="#{alunoBean.aluno}"  value="#{listaAlunos}" />
                        </p:commandLink>
                        <p:spacer width="15"/>
                        <p:commandLink id="removeButton" action="#{alunoBean.excluir()}" update=":lista">
                            <h:graphicImage library="images" name="remove.png"/>
                            <f:setPropertyActionListener target="#{alunoBean.aluno}"  value="#{listaAlunos}" />
                        </p:commandLink>
                    </p:column>  

                    <f:facet name="footer" >
                        <div align="left">
                            <p:commandLink global="false" update=":form:display" oncomplete="cadastroAluno.show()">
                                <h:graphicImage library="images" name="add.png"/> 
                            </p:commandLink>
                        </div>
                    </f:facet> 
                </p:dataTable>    
            </h:form>  
        </p:dialog>

        <p:dialog id="Modaldia" header="Cadastro Alunos" widgetVar="cadastroAluno" width="750" height="460" modal="true">  
            <h:panelGrid  >  
                <h:form id="cadastro">
                    <p:wizard widgetVar="wiz" >
                        <p:tab id="Pessoal" title="Dados Pessoais" >  
                            <p:panel >  
                                <h:panelGrid columns="2" columnClasses="label, value" styleClass="grid">
                                    <h:outputText value="Nome: *" />  
                                    <p:inputText size="59" value="#{alunoBean.aluno.nome}"/> 
                                </h:panelGrid> 

                                <h:panelGrid columns="12" columnClasses="label, value">
                                    <h:outputText  value="  CPF:   *" />  
                                    <p:inputMask id="cpf" label="cpf" size="15" mask="999.999.999-99" value="#{alunoBean.aluno.cpf}" />
                                    <p:watermark for="cpf" value="000.000.000-00" /> 
                                    <p:spacer width="10"/>
                                    <h:outputText value="RG: " />  
                                    <p:inputText size="9"  value="#{alunoBean.aluno.rg}"/>  
                                    <p:spacer width="10"/>
                                    <h:outputText value="OE: " />  
                                    <p:inputText size="6" value="#{alunoBean.aluno.orgaoEmissor}"/>
                                    <p:spacer width="8"/>
                                    <h:outputText value="UF: " />
                                    <h:selectOneMenu  effect="fold" editable="true" >  
                                        <f:selectItem itemLabel="RN" itemValue="0"  value="#{alunoBean.aluno.uf}"/>
                                        <f:selectItem itemLabel="PB" itemValue="0"  value="#{alunoBean.aluno.uf}"/>
                                        <f:selectItem itemLabel="PE" itemValue="0"  value="#{alunoBean.aluno.uf}"/>
                                        <f:selectItem itemLabel="AL" itemValue="0"  value="#{alunoBean.aluno.uf}"/>
                                        <f:selectItem itemLabel="CE" itemValue="0"  value="#{alunoBean.aluno.uf}"/>
                                        <f:selectItem itemLabel="SE" itemValue="0"  value="#{alunoBean.aluno.uf}"/>   
                                    </h:selectOneMenu> 
                                </h:panelGrid>

                                <h:panelGrid columns="6" columnClasses="label, value">
                                    <h:outputText  value="  Sexo: *" />  
                                    <h:selectOneMenu  effect="fold" editable="true" >  
                                        <f:selectItem itemLabel="Homem" itemValue="1" value="#{alunoBean.aluno.sexo}"/>
                                        <f:selectItem itemLabel="Mulher" itemValue="2" value="#{alunoBean.aluno.sexo}" />
                                    </h:selectOneMenu>

                                    <h:outputText value="Estado Civil:" />  
                                    <h:selectOneMenu  effect="fold" editable="true" >  
                                        <f:selectItem itemLabel="Solteiro" itemValue="1" value="#{alunoBean.aluno.estadoCivil}" />
                                        <f:selectItem itemLabel="Casado" itemValue="2" value="#{alunoBean.aluno.estadoCivil}"/>
                                        <f:selectItem itemLabel="Divorciado" itemValue="3" value="#{alunoBean.aluno.estadoCivil}"/>
                                        <f:selectItem itemLabel="Viuvo" itemValue="4" value="#{alunoBean.aluno.estadoCivil}"/>   
                                    </h:selectOneMenu>

                                    <h:outputText value="Data Nasc.:" />
                                    <p:inputMask id="data" size="10" mask="99/99/9999" value="#{alunoBean.aluno.dataNascimento}"/>
                                    <p:watermark for="data" value="00/00/0000" /> 
                                </h:panelGrid>

                                <p:separator id="separator"/>
                                <h:panelGrid columns="4" columnClasses="label, value">
                                    <h:outputText value="Profissão: " />  
                                    <p:inputText  size="23" value="#{alunoBean.aluno.profissao}"/>  

                                    <h:outputText value="Empresa: " />  
                                    <p:inputText  size="21" value="#{alunoBean.aluno.empresa}"/>                                    
                                </h:panelGrid>

                                <p:separator id="separato"/>
                                <h:panelGrid columns="6" columnClasses="label, value">
                                    <h:outputText value="Biotipo: *" />
                                    <h:selectOneMenu  effect="fold" editable="true" >  
                                        <f:selectItem itemLabel="Selecione Biotipo"  itemValue="" />  
                                        <f:selectItem itemLabel="Magro" itemValue="0" value="#{alunoBean.aluno.biotipo}"/>             
                                        <f:selectItem itemLabel="Mediano" itemValue="1" value="#{alunoBean.aluno.biotipo}"/>             
                                        <f:selectItem itemLabel="Gordo" itemValue="2" value="#{alunoBean.aluno.biotipo}"/>              
                                        <f:selectItem itemLabel="Obeso" itemValue="3" value="#{alunoBean.aluno.biotipo}"/>   
                                    </h:selectOneMenu> 
                                    <p:spacer width="50"/>
                                    <h:outputText value="Objetivo: *" />
                                    <h:selectOneMenu   >  
                                        <f:selectItem itemLabel="Selecione Objetivo" itemValue="" value="#{alunoBean.aluno.objetivo}"/>  
                                        <f:selectItem itemLabel="Emagrecimento" itemValue="0"  value="#{alunoBean.aluno.objetivo}"/>
                                        <f:selectItem itemLabel="Hipertrofia" itemValue="1"  value="#{alunoBean.aluno.objetivo}"/>
                                        <f:selectItem itemLabel="Condicionamento Físico" itemValue="2"  value="#{alunoBean.aluno.objetivo}"/>
                                        <f:selectItem itemLabel="Flexibilidade" itemValue="3"  value="#{alunoBean.aluno.objetivo}"/>  
                                    </h:selectOneMenu> 
                                </h:panelGrid>
                            </p:panel>
                        </p:tab>

                        <p:tab id="Endereco" title="Endereço">  
                            <p:panel >  
                                <h:panelGrid columns="3" columnClasses="label, value">  
                                    <h:outputText value="CEP: " />  
                                    <p:inputMask id="cep" size="15" mask="99.999-999" value="#{alunoBean.aluno.cep}"/>
                                    <p:watermark for="cep" value="00.000-000" /> 
                                </h:panelGrid>
                                <p:separator id="separa"/>

                                <h:panelGrid columns="4" columnClasses="label, value">
                                    <h:outputText value="Logradouro: " />  
                                    <p:inputText size="40" value="#{alunoBean.aluno.logradouro}"/>  

                                    <h:outputText value="N°: " />  
                                    <p:inputText size="4" value="#{alunoBean.aluno.numero}"/>
                                </h:panelGrid>  

                                <h:panelGrid columns="6" columnClasses="label, value">
                                    <h:outputText value="Bairro: " />  
                                    <p:inputText size="19" value="#{alunoBean.aluno.bairro}"/>

                                    <h:outputText value="Cidade: " />  
                                    <p:inputText size="15" value="#{alunoBean.aluno.cidade}"/>  

                                    <h:outputText value="UF: " />  
                                    <p:inputText size="4" value="#{alunoBean.aluno.ufCidade}"/>
                                </h:panelGrid>

                                <h:panelGrid columns="2" columnClasses="label, value">
                                    <h:outputText value="Complemento: " />  
                                    <p:inputText size="50" value="#{alunoBean.aluno.complemento}"/>
                                </h:panelGrid>
                            </p:panel>  
                        </p:tab>

                        <p:tab id="Contato" title="Contato">
                            <p:panel >
                                <h:panelGrid columns="6" columnClasses="label, value">
                                    <h:outputText value="Contato: " />  
                                    <p:inputText />

                                    <h:outputText value="Numero " />  
                                    <p:inputMask id="contato" size="15" mask="(99)9999-9999"/>
                                    <p:watermark for="contato" value="(00)0000-0000" /> 

                                    <p:commandLink  update="contatoList">
                                        <h:graphicImage library="images" name="add.png" />
                                    </p:commandLink>
                                </h:panelGrid>

                                <p:separator id="separateContato"/>

                                <p:dataTable selectionMode="single" id="contatoList" editable="true">  

                                    <f:facet name="header">  
                                        Contatos 
                                    </f:facet>  

                                    <!--<p:ajax event="rowEdit" update=":form:messages" />  
                                    <p:ajax event="rowEditCancel"  update=":form:messages" /> --> 

                                    <p:column headerText="Contato" style="width:30%">  
                                        <p:cellEditor>  
                                            <f:facet name="output">  
                                                <h:outputText  value="#{alunoBean.contatoAluno.tipoContato}"/>  
                                            </f:facet>  
                                            <f:facet name="input">  
                                                <p:inputText style="width:100%"/>  
                                            </f:facet>  
                                        </p:cellEditor>  
                                    </p:column>  

                                    <p:column headerText="Numero" style="width:20%">  
                                        <p:cellEditor>  
                                            <f:facet name="output">  
                                                <h:outputText value="#{alunoBean.contatoAluno.numeroTelefone}"/>  
                                            </f:facet>  
                                            <f:facet name="input">  
                                                <p:inputText  style="width:100%" />  
                                            </f:facet>  
                                        </p:cellEditor>  
                                    </p:column>  

                                    <p:column style="width:6%">  
                                        <p:rowEditor />
                                    </p:column>  
                                </p:dataTable>
                                <div align="right">
                                    <p:commandButton id="Save" value="Salvar" update="growl" actionListener="#{alunoBean.save(actionEvent)}" oncomplete="confirmation.show();cadastroAluno.hide();"/>
                                </div>
                            </p:panel>

                        </p:tab>

                        <p:confirmDialog id="confirmDialog" message="Salvo com Sucesso!!!"  
                                         header="!" severity="alert" widgetVar="confirmation">
                            <div align="left">
                                <h:graphicImage library="images" name="help"/>
                            </div>
                            <p:commandButton id="decline" value="OK" onclick="confirmation.hide();" type="button" />   

                        </p:confirmDialog>  

                        <!-- <p:tab id="Atividade" title="Atividades">
                            <p:panel >
                                <h:panelGrid columns="5" columnClasses="label, value">
                                    <h:outputText value="Tipo: " />  
                                    <h:selectOneMenu  >  
                                        <f:selectItem itemLabel="Selecione Categoria"  itemValue="" />  
                                        <f:selectItem itemLabel="JUMP" itemValue="0" />             
                                        <f:selectItem itemLabel="JUDO" itemValue="1" />             
                                        <f:selectItem itemLabel="DANÇA" itemValue="2" />
                                    </h:selectOneMenu> 

                                    <h:outputText value="Turma:" />  
                                    <h:selectOneMenu  effect="fold" editable="true"  >  
                                        <f:selectItem itemLabel="Selecione Turma"  itemValue="" />  
                                        <f:selectItem itemLabel="Manhã 1" itemValue="0" />             
                                        <f:selectItem itemLabel="Manhã 2" itemValue="1" />             
                                        <f:selectItem itemLabel="Tarde " itemValue="2" />
                                        <f:selectItem itemLabel="Noite 1" itemValue="3" />
                                        <f:selectItem itemLabel="Noite 2" itemValue="4" />
                                        <f:selectItem itemLabel="Noite 3" itemValue="5" />
                                    </h:selectOneMenu>

                                    <p:commandLink  update="atividadeList">
                                        <h:graphicImage library="images" name="add.png"  />
                                    </p:commandLink>
                                </h:panelGrid>

                                <p:separator id="separateAtividades"/>

                                <p:dataTable var="car" selectionMode="single" id="atividadeList" editable="true">  

                                    <f:facet name="header">  
                                        Atividades 
                                    </f:facet>  

                                    <p:ajax event="rowEdit" update=":form:messages" />  
                                    <p:ajax event="rowEditCancel"  update=":form:messages" />  

                                    <p:column headerText="Atividade" style="width:30%">  
                                        <p:cellEditor>  
                                            <f:facet name="output">  
                                                <h:outputText  />  
                                            </f:facet>  
                                            <f:facet name="input">  
                                                <p:inputText style="width:100%"/>  
                                            </f:facet>  
                                        </p:cellEditor>  
                                    </p:column>  

                                    <p:column headerText="Turma" style="width:20%">  
                                        <p:cellEditor>  
                                            <f:facet name="output">  
                                                <h:outputText  />  
                                            </f:facet>  
                                            <f:facet name="input">  
                                                <p:inputText  style="width:100%" label="Year"/>  
                                            </f:facet>  
                                        </p:cellEditor>  
                                    </p:column>

                                    <p:column headerText="Valor" style="width:20%">  
                                        <p:cellEditor>  
                                            <f:facet name="output">  
                                                <h:outputText  />  
                                            </f:facet>  
                                            <f:facet name="input">  
                                                <p:inputText  style="width:100%" label="Year"/>  
                                            </f:facet>  
                                        </p:cellEditor>  
                                    </p:column> 

                                    <p:column style="width:6%">  
                                        <p:rowEditor />
                                        <p:radioButton />
                                    </p:column>                               
                                </p:dataTable>

                            </p:panel>
                            <div align="right">
                             
                        </p:tab>-->
                    </p:wizard>
                </h:form>
            </h:panelGrid> 
        </p:dialog>

        <p:dialog id="modalDialo" header="Atividades" widgetVar="fomularioAtividades" modal="true" height="500" width="680">
            <div >
                <h:form>  
                    <h:panelGrid>
                        <h:outputLabel>
                            <p:inputText id="pesquisa"  size="30" />
                            <p:watermark for="pesquisa" value="Pesquisar" />
                            <p:spacer width="4"/>
                            <p:commandLink   update="listaAtividade" >
                                <h:graphicImage library="images" name="search.png"/>
                            </p:commandLink> 
                        </h:outputLabel>
                    </h:panelGrid>
                </h:form>  
            </div>
            <br></br>

            <h:form>  
                <p:dataTable var="listaAtividade" selectionMode="single" draggableColumns="true" editingRow="true" rows="7">  
                    <f:facet name="header">  
                        Atividades
                    </f:facet>  

                    <p:column headerText="Atividades"/>
                    <p:column headerText="Professores"/>
                    <p:column headerText="Turmas"/>
                    <p:column headerText="Quantidade"/>

                    <f:facet name="footer" >
                        <div align="left">
                            <p:commandLink global="false" update=":form:display" oncomplete="fomularioAtiv.show();">
                                <h:graphicImage library="images" name="add.png" /> 
                            </p:commandLink>
                            <p:spacer width="15"/>
                            <p:commandLink  update=":form:display" oncomplete="fomularioAtiv.show();">
                                <h:graphicImage library="images" name="edit.png"/> 
                            </p:commandLink> 
                            <p:spacer width="15"/>
                            <p:commandLink  update=":form:display">
                                <h:graphicImage library="images" name="remove.png"/> 
                            </p:commandLink>
                        </div>
                    </f:facet> 
                </p:dataTable>    
            </h:form>  
        </p:dialog>  

        <p:dialog id="modalD" header="Atividade" widgetVar="fomularioAtiv" modal="true" height="550" width="680">
            <h:form>
                <h:panelGrid columns="6" columnClasses="label, value">
                    <h:outputText value="Tipo: " />  
                    <h:selectOneMenu  >  
                        <f:selectItem itemLabel="Selecione Categoria"  itemValue="" />  
                        <f:selectItem itemLabel="JUMP" itemValue="0" />             
                        <f:selectItem itemLabel="JUDO" itemValue="1" />             
                        <f:selectItem itemLabel="DANÇA" itemValue="2" />
                    </h:selectOneMenu>

                    <p:commandLink oncomplete="addAtividade.show();">
                        <h:graphicImage library="images" name="add.png"/>
                    </p:commandLink>

                    <h:outputText value="Turma:" />  
                    <h:selectOneMenu  >  
                        <f:selectItem itemLabel="Selecione Turma"  itemValue="" />  
                        <f:selectItem itemLabel="Manhã 1" itemValue="0" />             
                        <f:selectItem itemLabel="Manhã 2" itemValue="1" />             
                        <f:selectItem itemLabel="Tarde " itemValue="2" />
                        <f:selectItem itemLabel="Noite 1" itemValue="3" />
                        <f:selectItem itemLabel="Noite 2" itemValue="4" />
                        <f:selectItem itemLabel="Noite 3" itemValue="5" />
                    </h:selectOneMenu>

                    <p:commandLink oncomplete="addTurma.show();">
                        <h:graphicImage library="images" name="add.png" />
                    </p:commandLink>
                </h:panelGrid>

                <h:panelGrid columns="5" columnClasses="label, value">
                    <h:outputText value="Professor(a): *" />
                    <p:inputText id="professor" size="26"/>

                    <h:outputText value="Horário:"/>
                    <p:inputText id="horario" size="6"/>
                    <p:watermark for="horario" value="00:00"/>
                </h:panelGrid>

                <p:separator id="separateAtividade"/>

                <p:dataTable var="car" selectionMode="single" id="List" editable="true">  

                    <f:facet name="header">  
                        Alunos 
                    </f:facet>  

                    <!--<p:ajax event="rowEdit" update=":form:messages" />  
                    <p:ajax event="rowEditCancel"  update=":form:messages" /> --> 

                    <p:column  style="width:30%">  
                        <p:cellEditor>  
                            <f:facet name="output">  
                                <h:outputText  />  
                            </f:facet>  
                            <f:facet name="input">  
                                <p:inputText style="width:100%"/>  
                            </f:facet>  
                        </p:cellEditor>  
                    </p:column>  

                    <p:column style="width:6%">  
                        <p:rowEditor />
                        <p:radioButton />
                    </p:column>                               
                </p:dataTable>                                                          

                <br></br>
                <div align="right">
                    <p:commandButton value="Salvar"/>
                    <p:commandButton value="Cancelar"/>
                </div>
            </h:form>
        </p:dialog>

        <p:dialog id="modalAddAtividade" header="Adicionar Atividade" widgetVar="addAtividade" modal="true" height="210" width="450">  
            <h:panelGrid columns="2" columnClasses="label, value">
                <h:outputText value="Atividade:" />
                <p:inputTextarea rows="3" cols="30" counter="counter" maxlength="10"       
                                 counterTemplate="{0} characters remaining." autoResize="false"/>
            </h:panelGrid>

            <h:form>
                <div align="right">
                    <p:commandButton value="Salvar"/>
                </div>
            </h:form>
        </p:dialog>

        <p:dialog id="modalAddTurma" header="Adicionar Turma" widgetVar="addTurma" modal="true" height="210" width="430">  
            <h:panelGrid columns="2" columnClasses="label, value">
                <h:outputText value="Turma:" />
                <p:inputTextarea rows="3" cols="30" counter="counter" maxlength="10"       
                                 counterTemplate="{0} characters remaining." autoResize="false"/>
            </h:panelGrid>

            <h:form>
                <div align="right">
                    <p:commandButton value="Salvar"/>
                </div>
            </h:form>
        </p:dialog>


        <p:dialog id="modalDial" header="Avaliações" widgetVar="fomularioAvaliacoes" modal="true" height="550" width="680">  
            <div >
                <h:form>  
                    <h:panelGrid>
                        <h:outputLabel>
                            <p:inputText id="pesquis"  size="30" />
                            <p:watermark for="pesquis" value="Pesquisar" />
                            <p:spacer width="4"/>
                            <p:commandLink   update="listaAtividade" >
                                <h:graphicImage library="images" name="search.png"/>
                            </p:commandLink> 
                        </h:outputLabel>
                    </h:panelGrid>
                </h:form>  
            </div>
            <br></br>

            <h:form>  
                <p:dataTable id="alunosEatividade" var="listaAtividade" selectionMode="single" draggableColumns="true" editingRow="true" rows="7">  
                    <f:facet name="header">  
                        Avaliações e Treinos
                    </f:facet>  

                    <p:column headerText="Aluno"/>
                    <p:column headerText="Atividade"/>
                    <p:column headerText="Avaliação"/>
                    <p:column headerText="Treino"/>

                    <f:facet name="footer" >
                        <div align="left">
                            <p:commandLink  update=":form:display" oncomplete="AvaliacaoAluno.show();" >
                                <h:graphicImage library="images" name="add.png" /> 
                            </p:commandLink>
                            <p:spacer width="15"/>
                            <p:commandLink  update=":form:display" >
                                <h:graphicImage library="images" name="edit.png"/> 
                            </p:commandLink> 
                            <p:spacer width="15"/>
                            <p:commandLink  update=":form:display">
                                <h:graphicImage library="images" name="remove.png"/> 
                            </p:commandLink>                          
                        </div>
                    </f:facet> 
                </p:dataTable>    
            </h:form>  
        </p:dialog> 

        <p:dialog id="moda" header="Avaliação" widgetVar="AvaliacaoAluno" modal="true" height="550" width="680">
            <h:form>
                <p:wizard widgetVar="wi"  >
                    <h:messages errorClass="error"/> 
                    <p:tab id="Geral" title="Geral" >  
                        <p:panel >  
                            <h:panelGrid columns="2" columnClasses="label, value" styleClass="grid">
                                <h:outputText value="Aluno: *" />  
                                <p:inputText label="nome" size="40"/> 
                            </h:panelGrid> 

                            <h:panelGrid columns="6" columnClasses="label, value">
                                <h:outputText  value="  Idade: *" />  
                                <p:inputText   size="4"   />

                                <h:outputText value="Peso: *" />  
                                <p:inputText size="5" />  

                                <h:outputText value="Altura: *" />  
                                <p:inputText size="6" />
                            </h:panelGrid>

                            <h:panelGrid columns="5" columnClasses="label, value">
                                <h:outputText  value="  Objetivo: *" />  
                                <h:selectOneMenu  effect="fold" editable="true" >  
                                    <f:selectItem itemLabel="Hipermetrofia" itemValue="1" />
                                    <f:selectItem itemLabel="Emagrecer" itemValue="" />
                                </h:selectOneMenu>
                                <p:spacer width="24"/>
                                <h:outputText value="IMC: *" />  
                                <p:inputText id="imc" size="10" />
                            </h:panelGrid>

                            <h:panelGrid columns="2" columnClasses="label, value">
                                <h:outputText value="Observação: " />  
                                <p:inputTextarea rows="2" cols="36" counter="counter" maxlength="10"       
                                                 counterTemplate="{0} characters remaining." autoResize="true"/> 
                            </h:panelGrid>
                        </p:panel>
                    </p:tab>

                    <p:tab id="Superior" title="Superior"> 

                        <p:panel style="height: 380px;width: 350px">
                            <div align="left">
                                <p:fieldset legend="Medidas" style="height: auto;width: 110px">
                                    <h:panelGrid columns="3"  columnClasses="label, value">  
                                        <h:outputText value="Ombro:"/>
                                        <p:spacer width="67" height="2"/>
                                        <h:outputText value="Peito:"/>
                                    </h:panelGrid>
                                    <h:panelGrid columns="3"  columnClasses="label, value">  
                                        <p:inputText id="Ombro" size="10"/>
                                        <p:spacer width="10"/>
                                        <p:inputText id="Peito" size="10"/>
                                    </h:panelGrid>
                                    <h:panelGrid columns="3"  columnClasses="label, value">  
                                        <h:outputText value="Abdômen:"/>
                                        <p:spacer width="40" height="2"/>
                                        <h:outputText value="Cintura:"/>
                                    </h:panelGrid>
                                    <h:panelGrid columns="3"  columnClasses="label, value">  
                                        <p:inputText id="Abdomen" size="10"/>
                                        <p:spacer width="10"/>
                                        <p:inputText id="Cintura" size="10"/>
                                    </h:panelGrid>
                                    <p:separator id="separatorMedida" />
                                    <h:panelGrid columns="3"  columnClasses="label, value">  
                                        <h:outputText value="Braço D."/>
                                        <p:spacer width="54" height="2"/>
                                        <h:outputText value="Braço E."/>
                                    </h:panelGrid>
                                    <h:panelGrid columns="3"  columnClasses="label, value">  
                                        <p:inputText id="Braco" size="10"/>
                                        <p:spacer width="10"/>
                                        <p:inputText id="Bracoe" size="10"/>
                                    </h:panelGrid>
                                    <h:panelGrid columns="3"  columnClasses="label, value">  
                                        <h:outputText value="Ant. Braço D."/>
                                        <p:spacer width="15" height="2"/>
                                        <h:outputText value="Ant. Braço E."/>
                                    </h:panelGrid>
                                    <h:panelGrid columns="3"  columnClasses="label, value">  
                                        <p:inputText id="AntD" size="10"/>
                                        <p:spacer width="10"/>
                                        <p:inputText id="AntE" size="10"/>
                                    </h:panelGrid>
                                </p:fieldset>
                            </div>

                            <p:commandLink  >
                                <h:graphicImage library="images" name="medidaSuperior.png"/>
                            </p:commandLink>                            

                        </p:panel>
                    </p:tab>

                    <p:tab id="Posterior" title="Posterior"> 

                        <p:panel style="height: 430px;width: 380px">
                            <div align="left">
                                <p:fieldset legend="Medidas" style="height: auto;width: 110px">
                                    <h:panelGrid columns="3"  columnClasses="label, value">  
                                        <h:outputText value="Coxa D."/>
                                        <p:spacer width="67" height="2"/>
                                        <h:outputText value="Coxa E."/>
                                    </h:panelGrid>
                                    <h:panelGrid columns="3"  columnClasses="label, value">  
                                        <p:inputText id="coxad" size="10"/>
                                        <p:spacer width="10"/>
                                        <p:inputText id="coxae" size="10"/>
                                    </h:panelGrid>
                                    <h:panelGrid columns="3"  columnClasses="label, value">  
                                        <h:outputText value="Femoral D."/>
                                        <p:spacer width="40" height="2"/>
                                        <h:outputText value="Femoral E."/>
                                    </h:panelGrid>
                                    <h:panelGrid columns="3"  columnClasses="label, value">  
                                        <p:inputText id="femod" size="10"/>
                                        <p:spacer width="10"/>
                                        <p:inputText id="femoe" size="10"/>
                                    </h:panelGrid>
                                    <p:separator id="separatorMedidainf" />
                                    <h:panelGrid columns="3"  columnClasses="label, value">  
                                        <h:outputText value="Panturrilha D."/>
                                        <p:spacer width="10" height="2"/>
                                        <h:outputText value="Panturrilha E."/>
                                    </h:panelGrid>
                                    <h:panelGrid columns="3"  columnClasses="label, value">  
                                        <p:inputText id="panturrilhad" size="10"/>
                                        <p:spacer width="10"/>
                                        <p:inputText id="panturrilhae" size="10"/>
                                    </h:panelGrid>
                                    <h:panelGrid columns="3"  columnClasses="label, value">  
                                        <h:outputText value="Perna D."/>
                                        <p:spacer width="55" height="2"/>
                                        <h:outputText value="Perna E."/>
                                    </h:panelGrid>
                                    <h:panelGrid columns="3"  columnClasses="label, value">  
                                        <p:inputText id="pernad" size="10"/>
                                        <p:spacer width="10"/>
                                        <p:inputText id="pernae" size="10"/>
                                    </h:panelGrid>
                                    <p:separator id="separatorMedid" />
                                    <h:outputText value="Quadril: "/>
                                    <p:inputText size="10"/>
                                </p:fieldset>
                            </div>

                            <p:commandLink  >
                                <h:graphicImage library="images" name="medidaPosterior.png"/>
                            </p:commandLink>                            

                        </p:panel>
                    </p:tab>
                </p:wizard>
            </h:form>
        </p:dialog> 

        <p:dialog id="modalDialt" header="Treinos" widgetVar="fomularioTreinos" modal="true" height="550" width="680">  
            <h:panelGrid columns="7">
                <h:outputText value="Categoria: " />
                <p:spacer width="80" height="2" />
                <h:outputText value="Grupo: " />  
                <p:spacer width="105" height="2" />
                <h:outputText value="Exercicio: " /> 
                <p:spacer width="80" height="2"  />
                <h:outputText value="Series:"/>
            </h:panelGrid>
            <h:panelGrid columns="9">
                <h:selectOneMenu  effect="fold" editable="true"  style="width: 150px">  
                    <f:selectItem itemLabel="Selecione "  itemValue="" />  
                    <f:selectItem itemLabel="A" itemValue="0" />             
                    <f:selectItem itemLabel="B" itemValue="1" />             
                    <f:selectItem itemLabel="C" itemValue="2" />
                </h:selectOneMenu>
                <p:spacer width="20"/>
                <h:selectOneMenu  effect="fold" editable="true"  style="width: 150px">  
                    <f:selectItem itemLabel="Selecione "  itemValue="" />  
                    <f:selectItem itemLabel="Superior" itemValue="0" />             
                    <f:selectItem itemLabel="Posterior" itemValue="1" />             
                </h:selectOneMenu>
                <p:spacer width="20"/>
                <h:selectOneMenu  effect="fold" editable="true"  style="width: 150px">  
                    <f:selectItem itemLabel="Selecione "  itemValue="" />  
                </h:selectOneMenu>
                <p:spacer width="15"/>
                <p:inputText id="serie" size="5" />
                <p:watermark for="serie" value="00x00"/>
                <h:form>
                    <p:commandLink >
                        <h:graphicImage library="images" name="add.png" />
                    </p:commandLink>
                </h:form>
            </h:panelGrid>

            <h:form>  
                <p:dataTable id="alunosEtreinos" var="listatreinos" selectionMode="single" draggableColumns="true" editingRow="true" rows="7">  
                    <f:facet name="header">  
                        Treinos
                    </f:facet>  

                    <p:column headerText="Categoria"/>
                    <p:column headerText="Exercicio"/>
                    <p:column headerText="Serie"/>

                    <f:facet name="footer" >
                        <div align="left">
                            <p:commandLink  update=":form:display" >
                                <h:graphicImage library="images" name="printer.png"/> 
                            </p:commandLink>
                            <p:spacer width="20"/>
                            <p:commandLink  update=":form:display">
                                <h:graphicImage library="images" name="remove.png"/> 
                            </p:commandLink>                          
                        </div>
                    </f:facet> 
                </p:dataTable>    
            </h:form>
            <br></br>
            <div align="right">
                <h:form>
                    <p:commandButton value="Salvar"/>
                    <p:commandButton value="Cancelar"/>
                </h:form>
            </div>
        </p:dialog> 

    </h:body>
</html>

